const { BrowserWindow } = require("electron");

class Ipc {
    static send(channel, ...args) {
        const windows = BrowserWindow.getAllWindows();
        windows.forEach(i => !i.isDestroyed() && i.webContents && i.webContents.send(channel, ...args));
    }
}

module.exports = {
    Ipc,
};
